<?php

namespace App\Http\Controllers\Basic;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Validator;
use Mews\Captcha\Facades\Captcha;

class MiscController extends Controller
{
    public  function  city(Request $request)
    {
        $parentId = intval($request->input('parent_id', 0));

        $list = DB::table('area')->where('parent_id', $parentId)->orderby('sort')->get()->toArray();

        $this->setData($list);

        return $this->response();
    }
}
